package com.proyecto.spv.client.view;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Button;

public class AgregarEmpresaView extends Composite {

	public AgregarEmpresaView() {
		
		VerticalPanel verticalPanel = new VerticalPanel();
		initWidget(verticalPanel);
		verticalPanel.setHeight("286px");
		
		DecoratorPanel decoratorPanel = new DecoratorPanel();
		verticalPanel.add(decoratorPanel);
		decoratorPanel.setWidth("413px");
		
		FlexTable flexTable = new FlexTable();
		decoratorPanel.setWidget(flexTable);
		flexTable.setSize("375px", "89px");
		
		Label lblDatosDeLa = new Label("Datos de la Empresa");
		lblDatosDeLa.setStyleName("gwt-Label-Title");
		lblDatosDeLa.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		flexTable.setWidget(0, 0, lblDatosDeLa);
		
		Label lblRuc = new Label("RUC:");
		lblRuc.setStyleName("gwt-label-normal");
		flexTable.setWidget(1, 0, lblRuc);
		
		TextBox textBox = new TextBox();
		flexTable.setWidget(1, 1, textBox);
		
		Label lblRazonSocial = new Label("Razon Social:");
		lblRazonSocial.setStyleName("gwt-label-normal");
		flexTable.setWidget(2, 0, lblRazonSocial);
		
		TextBox textBox_1 = new TextBox();
		flexTable.setWidget(2, 1, textBox_1);
		
		Label lblDireccion = new Label("Direccion:");
		lblDireccion.setStyleName("gwt-label-normal");
		flexTable.setWidget(3, 0, lblDireccion);
		
		TextBox textBox_2 = new TextBox();
		flexTable.setWidget(3, 1, textBox_2);
		
		Label lblTelefono = new Label("Telefono:");
		lblTelefono.setStyleName("gwt-label-normal");
		flexTable.setWidget(4, 0, lblTelefono);
		
		TextBox textBox_3 = new TextBox();
		flexTable.setWidget(4, 1, textBox_3);
		
		Label lblEstado = new Label("Estado:");
		lblEstado.setStyleName("gwt-label-normal");
		flexTable.setWidget(5, 0, lblEstado);
		
		ListBox listBox = new ListBox();
		flexTable.setWidget(5, 1, listBox);
		listBox.setWidth("168px");
		flexTable.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
		flexTable.getCellFormatter().setHorizontalAlignment(2, 0, HasHorizontalAlignment.ALIGN_RIGHT);
		flexTable.getCellFormatter().setHorizontalAlignment(3, 0, HasHorizontalAlignment.ALIGN_RIGHT);
		flexTable.getCellFormatter().setHorizontalAlignment(4, 0, HasHorizontalAlignment.ALIGN_RIGHT);
		flexTable.getCellFormatter().setHorizontalAlignment(5, 0, HasHorizontalAlignment.ALIGN_RIGHT);
		
		HorizontalPanel horizontalPanel = new HorizontalPanel();
		horizontalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		verticalPanel.add(horizontalPanel);
		verticalPanel.setCellHorizontalAlignment(horizontalPanel, HasHorizontalAlignment.ALIGN_CENTER);
		horizontalPanel.setWidth("409px");
		
		Button btnAgregar = new Button("Agregar");
		horizontalPanel.add(btnAgregar);
		btnAgregar.setWidth("92px");
		
		Button btnLimpiar = new Button("Limpiar");
		horizontalPanel.add(btnLimpiar);
		btnLimpiar.setWidth("78px");
	}

}
